#!/usr/bin/ruby

require 'rexml/document'
include REXML
file = File.new("casa.xml")
doc = Document.new(file)
XPath.each(doc, "/micasa//habitacion/puerta[@a=\"" + ARGV[0] + "\"]") { |texto|
  puts texto.text
}
